Skip to content

Fix browser boltAgent in web workers context #1094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2023

Conversation

bigmontz
Copy link
Contributor

@bigmontz bigmontz commented Jun 9, 2023

The driver was trying to access the window object inside web workers. This object doesn't exist in this context.
So, the driver was throwing an error and not creating connections at all.

This problem is solved by access the navigator directly from the global scope (which is the window outside the web workers). Some guards were added to avoid the code break in case navigator is not defined.

The driver was trying to access the `window` object inside web workers.
This object doesn't exist in this context.
So, the driver was throwing an error and not creating connections at all.

This problem is solved by access the `navigator` directy from the global scope (which is the `window` outside the web workers).
Some guards were added to avoid the code break in case `navigator` is not defined.
@bigmontz bigmontz merged commit 9c2519a into neo4j:5.0 Jun 9, 2023
@bigmontz bigmontz deleted the fix-bolt-agent-web-worker branch June 9, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants